<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .main{
            width: 500px;
            height: 500px;
            background-color: skyblue;
            display: flex;
            flex-flow: column wrap;
            /*justify-content: space-around;*/
            /*justify-content: space-between;*/
            justify-content: space-evenly;
        }

        .main div{
            width: 100px;
            height: 100px;
            background-color: red;
            border: 1px solid royalblue;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<div class="main">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
</div>
</body>
</html>
